package cloudoer.su.service;

import cloudoer.su.base.BaseService;
import cloudoer.su.entity.Role;
import cloudoer.su.entity.User;
import cloudoer.su.exception.ServiceException;

import java.io.File;
import java.io.OutputStream;
import java.util.List;
import java.util.Set;

public interface UserService extends BaseService {

    User login(User user);

    List<User> getAll();

    List<User> getByPage(int pageNo, int pageSize);

    User getById(String id);

    User getByNumber(String number);

    String add(User user, String personNumber, String[] roleNumbers);

    void update (User user, String personNumber, String[] roleNumbers);

    void delete (String id);

    String importFile(File file) throws ServiceException;

    void exportFile(OutputStream os)throws Exception;

    Set<Role> getRoles (String id);

    void deleteRole(String id, String roleId);

    int getCount();
}
